package com.info.zhiduoduo.admin.model.formbean.crowdsource;

import com.info.zhiduoduo.repository.entity.quota.CompanyQuota;
import com.info.zhiduoduo.repository.entity.quota.MakerQuota;

import org.springframework.beans.BeanUtils;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class CompanyQuotaFormBean {

	/**
	 * 企业id
	 */
	@ApiModelProperty("企业id")
	private int compid;

	/**
	 * 企业id专门的限额开关 0：关，1：开
	 */
	@ApiModelProperty("企业id专门的限额开关 0：关，1：开")
	private int quotaFlag;

	/**
	 * 单笔项目限额
	 */
	@ApiModelProperty("单笔项目限额")
	private double singleQuota;

	/**
	 * 月度限额
	 */
	@ApiModelProperty("月度限额")
	private double monthlyQuota;

	/**
	 * 季度限额
	 */
	@ApiModelProperty("季度限额")
	private double quarterlyQuota;

	/**
	 * 年度限额
	 */
	@ApiModelProperty("年度限额")
	private double yearlyQuota;

	public CompanyQuota toEntity() {
		CompanyQuota companyQuota = new CompanyQuota();
		BeanUtils.copyProperties(this, companyQuota);
		return companyQuota;
	}
}
